1. Field of the Invention
The present invention relates generally to data routing, and more particularly, to measuring traffic in a communications network.
2. Description of Related Art
Service providers desire the ability to measure network traffic transmitted through network routers, including layer 2 (L2) headers, framing information, and padding information, on a per-customer basis. In many routers, a layer 3 (L3) forwarding subsystem performs the per-customer accounting functions. In these routers, however, a receive line card typically strips incoming packets of the L2 overhead before the packets are transmitted to the L3 forwarding subsystem. Therefore, the L3 forwarding subsystem is not able to consider the L2 overhead when performing the per-customer accounting.
Similarly, when a packet is to be transmitted from a router, the L3 forwarding subsystem generally performs the per-customer accounting. The L3 forwarding subsystem then passes the packet to the line card where the L2 overhead information is added. In such a system, the L3 forwarding subsystem does not consider the L2 overhead information when performing per-customer accounting.
It is, therefore, desirable to improve per-customer accounting in a network device.